//@ts-nocheck
export function getLocalUserMedia(constrains:MediaStreamConstraints) {
    if (window.navigator.mediaDevices.getUserMedia) {
        return window.navigator.mediaDevices.getUserMedia(constrains);
    } else if (window.navigator?.webkitGetUserMedia) {
        return window.navigator?.webkitGetUserMedia(constrains);
    } else if (window.navigator?.mozGetUserMedia) {
        return window.navigator?.mozGetUserMedia(constrains);
    } else if (window.navigator?.getUserMedia) {
        return window.navigator?.getUserMedia(constrains);
    }
    throw new Error("unable to get user media");
}
